package com.atzzy.ysmall.ysmall_api.UserServiceAllController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.atzzy.ysmall.ysmall_allService.UserService.UserCheck;
import com.atzzy.ysmall.ysmall_beans.Users;
import com.atzzy.ysmall.ysmall_common.vo.R;
import org.springframework.web.bind.annotation.*;

/**
 * @Author JAVAZeng
 * @Date 2022/2/23 19:57
 * @Version 1.0
 */
@RestController
@CrossOrigin
@RequestMapping("userCheck")
public class UserCheckController {

    @Reference
    private UserCheck userCheck;

    @RequestMapping(value = "checkUserBaseInfo",method = RequestMethod.GET)//用户信息验证接口
    public R UserCheckBaseInfoController(Users users){
//        System.out.println(users);
        return userCheck.checkUserBaseInfo(users);
    }
    @RequestMapping(value = "userResetPwd",method = RequestMethod.POST)//重置密码接口
    public R UserRestPwd(@RequestBody Users users)
    {
        return userCheck.userResetPwd(users);
    }

    @RequestMapping(value = "usercheckusername",method = RequestMethod.GET)
    public R UserCheckUserName(@RequestParam("username") Users users)
    {
        return userCheck.checkUserName(users.getUsername());
    }
}
